package cn.tworice.blog.entity;

import io.swagger.models.auth.In;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * 文件实体
 * @author 二饭
 * @email 1786705138@qq.com
 */

@Component
public class File implements Serializable {

    // 文件id
    private Integer id;

    // 用户上传前的名字
    private String oldName;

    // 用户上传后随机生成的名字
    private String newName;

    // 是否隐秘 默认0
    private Integer safe;

    // 文件所在的目录ID
    private Integer dir;

    // 文件所在的目录名
    private String dirName;

    // 文件上传时间
    private Long date;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOldName() {
        return oldName;
    }

    public void setOldName(String oldName) {
        this.oldName = oldName;
    }

    public String getNewName() {
        return newName;
    }

    public void setNewName(String newName) {
        this.newName = newName;
    }

    public Integer getSafe() {
        return safe;
    }

    public void setSafe(Integer safe) {
        this.safe = safe;
    }

    public Integer getDir() {
        return dir;
    }

    public void setDir(Integer dir) {
        this.dir = dir;
    }

    public String getDirName() {
        return dirName;
    }

    public void setDirName(String dirName) {
        this.dirName = dirName;
    }

    public Long getDate() {
        return date;
    }

    public void setDate(Long date) {
        this.date = date;
    }

    public File(String oldName, String newName, Integer safe, Integer dir, Long date) {
        this.oldName = oldName;
        this.newName = newName;
        this.safe = safe;
        this.dir = dir;
        this.date=date;
    }

    public File(Integer id, String oldName, String newName, Integer safe, Integer dir, String dirName, Long date) {
        this.id = id;
        this.oldName = oldName;
        this.newName = newName;
        this.safe = safe;
        this.dir = dir;
        this.dirName = dirName;
        this.date = date;
    }

    public File() {
    }
}
